/* 全局样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

/* 页面布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 头部样式 */
.header {
  background-color: #007bff;
  color: white;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 24px;
  margin: 0;
}

/* 聊天区域样式 */
.chat-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: white;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #e0e0e0;
}

.message {
  margin-bottom: 20px;
  padding: 10px 15px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

.user-message {
  background-color: #007bff;
  color: white;
  margin-left: auto;
}

.ai-message {
  background-color: #f0f0f0;
  color: #333;
  margin-right: auto;
}

.system-message {
  text-align: center;
  color: #666;
  margin: 10px 0;
  font-style: italic;
}

/* 工具消息样式 */
.tool-message {
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #dee2e6;
  padding: 10px;
  margin: 10px 0;
  border-radius: 4px;
}

.tool-name {
  font-weight: bold;
  color: #28a745;
}

.tool-arguments {
  font-family: monospace;
  background-color: #f1f1f1;
  padding: 5px;
  margin: 5px 0;
  border-radius: 4px;
  white-space: pre-wrap;
}

.tool-result {
  font-family: monospace;
  background-color: #f8f9fa;
  padding: 5px;
  margin: 5px 0;
  border-radius: 4px;
  white-space: pre-wrap;
}

/* 输入区域样式 */
.input-container {
  display: flex;
  padding: 15px;
  background-color: #f0f0f0;
  border-radius: 0 0 8px 8px;
  border: 1px solid #e0e0e0;
}

.input-field {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  margin-right: 10px;
  resize: none;
}

.send-button {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.send-button:hover {
  background-color: #0056b3;
}

.send-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* 加载动画 */
.loading-indicator {
  display: inline-block;
  margin: 0 10px;
}

.loading-indicator span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px;
  background-color: #007bff;
  border-radius: 50%;
  animation: loading 1.4s infinite ease-in-out both;
}

.loading-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading {
  0%, 80%, 100% { 
    transform: scale(0);
  } 40% { 
    transform: scale(1.0);
  }
}

/* 命令按钮 */
.command-buttons {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

.command-button {
  padding: 5px 10px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.command-button:hover {
  background-color: #e0e0e0;
} 